#! /bin/bash

NDKDIR=${HOME}/android-ndk-r7

LIBSTDCXXDIR=${NDKDIR}/sources/cxx-stl/gnu-libstdc++
LIBSTDCXXINC=${LIBSTDCXXDIR}/include
LIBSTDCXXLIB="-L`pwd`"
TOOLCHAIN=${HOME}/android-toolchain
LIBSTDCXXLIB="-lstdc++"

TARGET=`pwd`/${ARCH}

cccmd="agcc -c test_agcc.cpp -o test_agcc.o"
echo ${cccmd}
${cccmd}

arcmd="${TOOLCHAIN}/bin/arm-linux-androideabi-ar rcs libtest.a test_agcc.o"
echo ${arcmd}
$arcmd

ldcmd="agcc ${LIBSTDCXXLIB} -L`pwd` -ltest -o test.out"
echo  ${ldcmd}
${ldcmd}
